Alibabacloud.com offers a wide variety of articles about npm search private registry, easily find your npm search private registry information here online.
. Ali's cnpm can also be used to build private NPM, but the configuration is slightly more troublesome. Installing Sinopia
NPM install-g Sinopia
After the installation succeeds, modify the NPM path to local,
NPM Set Registry http
:[email protected]:5984/registry npm Run copy--npm-registry-couchapp:couch =http://admin:[email protected]:5984/registry couchapp push www/app.js http://admin:[email protected]:5984/registryHere, push it up. Two Program Access address:Http://localhost:5984/_utils/
-proxy
Local NPM Settings Verify with NPM version
[Root@angular ~]# npm-v
5.5.1
[root@angular ~]# node-v-v9.1.0
Specific installation can refer to: http://blog.csdn.net/liumiaocn/article/details/78510679 settings. NPMRC
You can use the following command, or you can modify the. npmrc file directly
[root@angular ~]#
@ipaddress:5984/registry[root@npm_private npm-registry-couchapp]# npm run load --npm-registry-couchapp:couch=http://admin:admin@ipaddress:5984/registry7. synchronize the official npm Li
Index.js file under Config directory.5. Start the serviceOnce the above steps are configured, you can start the CNPMJS service, for example, enter a command:1 node--harmony_generators dispatch.js After starting the service, enter in the browser: http://127.0.0.1:7002, if you see the following page, it means success!6. Client UseThe private service is set up, how to use it on the client?The simplest way to do this is to set up NPM's
(assuming you have installed the node environment)
$ NPM Install sinopia-g
$ sinopia
Then open the browser access address http://localhost:4873/Normal display is successful, 4873 is the default port configuration NPM Agent
After the Sinopia is started, the NPM agent used by the client is set up first through the NPM
As the front-end team grows, the sharing of code between projects becomes particularly important. Commonly used frameworks/libraries do not need to put a share in each project, and the public modules that are produced within the team also need to have a reasonable sharing mechanism. Managing front-end code with NPM is now an industry trend. The landlord tries to use the private
the following within Index.js
let greeting = function(name) {
return 'Hello ' + name;
}
module.exports = greeting;
This code exports a function that can be published and relied upon.
NPM AddUser
The first time you use this private repository you need to add users
npm adduser --registry http://ubunt
;}module.exports = greeting;
This code exports a function that can be published and relied upon.
NPM AddUser
The first time you use this private repository you need to add users
npm adduser --registry http://ubuntu-17:4873
NPM Publish
And then post the co
c457c689c328 9 Day S ago 165.7 mb10.10.105.71:5000/tonybai/busybox latest 65e4158d9625 9 days ago 1.1 Mbbusybox latest 65e4158d9625 9 days ago 1.114 Mbubuntu 14.04 6cc0fc2a5ee3 5 weeks ago 187.9 MB
As you can see: The pull process is also smooth.
If you view or retrieve repository or images in private Registry2, you will not be able to use Docker search:
$ docker
registry runtime for the first time. Then, you can find the private repository under/data/registry, check my local image here[Root @ docker data] # docker imagesREPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZEDocker. io/registry latest ddfbba49d0b6 21 hours ago 423.6 MBDocker. io/centos latest 7322fbe74aa5 3 weeks ago 172
/busyboxlatest0064fda8c45d5daysago1.113MB
docker.io/registrylatest105c6c9299d95daysago423.3MB
docker.io/centoslatestce20c473cd8a6daysago172.3MB
4. Run containers based on private repository Images
By default, the repository is stored in the/tmp/registry directory of the container. If the container is deleted, the image stored in the container will also be lost, therefore, we usually specify a local director
After using the Docker login command, you can push the image to the Dockerhub using the push command, but dockerhub on the public web, the free account has only one private repository free, All that remains is to be made public. Due to various restrictions, the creation of enterprise private warehouses has a variety of application scenarios. This article will briefly describe how to build a
Docker Registry Private Warehouse Build
The authorities have already provided many versions of the Linux image, which can be downloaded directly from the official warehouse (public repositories). If security and speed are considered, we may want to set up a private warehouse in our local area network (private reposito
Why is it necessary to build a private registry? Well, for starters, the Docker Hub (a docker public warehouse) only allows you to have a free private version of the library (repo). Other companies are starting to offer similar services, but the price is not cheap. In addition, if you need to deploy an application for a production environment with Docker, I'm afr
Many official versions of Linux images can be downloaded directly from the official repository (Public repositories. Considering the security and speed, we may want to set up a private repositories in our own LAN to store our own images. docker-registry is the tool we need.
git clone git clone https://github.com/docker/docker-registry.gitcd docker-registry/config
/CA.CRT/ETC/DOCKER/CERTS.D/HARBOR.TEST.COM/CA.CRTUser Login [local need to do hosts harbor.test.com domain name redirect to Harbor server IP]Docker login-u admin-p Harbor12345 harbor.test.comTip "Login succeeded" is successfulDocker Download Redis Image:Docker Pull RedisRenaming a mirror using Docker tagUpload image to harbor WarehouseLog on to the web to see if the image was uploaded successfullyDelete local mirrorDocker RMI harbor.test.com/public/redis:v1.0.0Download the image from the harborD
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.